package org.zjx.command.basic;

import org.zjx.command.Command;
import org.zjx.core.GameWindow;
import org.zjx.util.HwndUtil;

/**
 * 移动窗口指令 - 不需要激活
 */
public class MoveWindowCommand extends Command {
    private final GameWindow window;

    public MoveWindowCommand(GameWindow window) {
        super(window, false, "Move[" + window.getId() + "]");
        this.window = window;
    }

    @Override
    protected void doExecute() {
        System.out.println("[Command] Move for " + window.getId());
        HwndUtil.moveWindow(window.getHwnd(), window.getBounds().x, window.getBounds().y);
    }
}